package com.aiyige.utils.banner.model;

/**
 * Created by zhuyakun on 2018/4/28.
 */
public class BannerIndicatorItem {
    public static final int TYPE_PLACEHOLDER = 1;
    public static final int TYPE_NORMAL = 2;
    int type;
    boolean selected;

    public BannerIndicatorItem() {
    }

    private BannerIndicatorItem(Builder builder) {
        setType(builder.type);
        setSelected(builder.selected);
    }

    public static Builder newBuilder() {
        return new Builder();
    }

    public int getType() {
        return type;
    }

    public void setType(int type) {
        this.type = type;
    }

    public boolean isSelected() {
        return selected;
    }

    public void setSelected(boolean selected) {
        this.selected = selected;
    }

    public static final class Builder {
        private int type;
        private boolean selected;

        private Builder() {
            type = TYPE_NORMAL;
            selected = false;
        }

        public Builder type(int type) {
            this.type = type;
            return this;
        }

        public Builder selected(boolean selected) {
            this.selected = selected;
            return this;
        }

        public BannerIndicatorItem build() {
            return new BannerIndicatorItem(this);
        }
    }
}
